// @ts-nocheck
import axios from "axios";
import http from "../../utils/Axios";

export interface IEventList {
	categoryCompleteName: string;
	code: string;
	name: string;
	parentCode: string;
	parentName: string;
	sorting: number;
	categoryChild?: IEventList[];
}

interface IUploadImage {
	file: File;
}

export async function upLoadImage(prams: IUploadImage) {
	const formData = new FormData();
	formData.append("file", prams.file);

	return await axios.post("/api/seh-resource/attach/uploads", formData, {
		headers: {
			"Content-type": "multipart/form-data",
		},
	});
}
/**
 *
 * @param parmas
 * @returns 我的任务列表
 */
export async function getWorkList(parmas) {
	return http<any>("get", `/app/keeper-special/charm/company/index/taskList`, parmas);
}

/**
 *
 * @param parmas
 * @returns 详情处置
 */
export async function completeTask(parmas) {
	return http<any>("post", `/app/keeper-special/charm/company/index/completeTask`, parmas);
}
/**
 *
 * @param parmas
 * @returns 人员列表
 */
export async function getPersonnelList(params: { size: number, current: number, keyword?: string }) {
	return http<any>("get", "/app/keeper-special/charm/company/index/personInfos", params);
}
/**
 *
 * @param parmas
 * @returns 人员列表
 */
export async function serviceInput(params: IserviceInput) {
	return http<any>("post","/app/keeper-special/charm/company/index/serviceInput",params);
}